package com.llcbenwu.social.openid;

import com.llcbenwu.social.SocialAuthenticationFilterPostProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.social.security.SocialAuthenticationFilter;
import org.springframework.stereotype.Component;

/**
 * @author lilinchun
 * @date 2021/11/15 0015 20:03
 *
 * 设置app下springsocial走的成功处理器
 */
@Component
public class AppSocialAuthenticationFilterPostProcessor implements SocialAuthenticationFilterPostProcessor {

    //认证成功后返回token的成功处理器
    @Autowired
    private AuthenticationSuccessHandler llcAuthenticationSuccessHandler;
    @Override
    public void process(SocialAuthenticationFilter socialAuthenticationFilter) {
        socialAuthenticationFilter.setAuthenticationSuccessHandler(llcAuthenticationSuccessHandler);
    }


}
